package com.g4.shoppingback.service.impl;

import com.g4.shoppingback.pojo.Permission;
import com.g4.shoppingback.mapper.PermissionMapper;
import com.g4.shoppingback.service.IPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author admin
 * @since 2022-02-19
 */
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements IPermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    /**
     * 查询所有权限
     * @return 返回所有权限
     */
    @Override
    public List<Permission> findAll() {
        List<Permission> permissions = permissionMapper.findAll();
        return permissions;
    }
}
